<#-- ** ------------------------------- 
* Function: <Html></Html>。
* 
* @author Brin
* @date   2013-03-07
*  
* @param  (String) path  文件全路径
* ------------------------------- ** -->
<#macro Html flag>
	<#if flag == "begin">
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns=" http://www.w3.org/1999/xhtml">
	<#elseif flag == "end">
		</html>
	</#if>
</#macro>

<#-- ** ------------------------------- 
* Function: <Head></Head>。
* 
* @author Brin
* @date   2013-03-07
*  
* @param  (String) path  文件全路径
* ------------------------------- ** -->
<#macro Head flag>
	<#if flag == "begin">
		<head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
			<meta http-equiv="pragma" content="no-cache">
			<meta name="keywords" content="freemarker">
			<meta http-equiv="cache-control" content="no-cache">
			<meta http-equiv="expires" content="0">
			<meta http-equiv="X-UA-Compatible" content="IE=7">
	<#elseif flag == "end">
        </head>
	</#if>
</#macro>

<#-- ** -------------------------------- 
* Function: <title></title>。
* 
* @author Brin
* @date   2013-03-07
*  
* @param  (String) path  文件全路径
* ------------------------------- ** -->
<#macro Title title>
	<title>${esc.htmlEscape('${title}')}</title>
</#macro>

<#-- ** -------------------------------- 
* Function: 载入静态资源服务器上的JS文件。
* 
* @author Brin
* @date   2013-05-01
*  
* @param  (String) path  文件全路径
* ------------------------------- ** -->
<#macro LoadJS path>
	<#local temp = "${esc.htmlEscape('${path}')}"/>
	<script type="text/javascript" src="${env.getStaticURL('${temp}')}" charset="UTF-8"></script>
</#macro>

<#-- ** -------------------------------- 
* Function: 载入静态资源服务器上的CSS文件。
* 
* @author Brin
* @date   2013-05-01
*  
* @param  (String) path  文件全路径
* ------------------------------- ** -->
<#macro LoadCSS path>
	<#local temp = "${esc.htmlEscape('${path}')}"/>
	<link rel="stylesheet" type="text/css" href="${env.getStaticURL('${temp}')}" charset="UTF-8"></link>
</#macro>

<#-- ** -------------------------------- 
* Function: 载入ZUI组件。
* 
* @author Brin
* @date   2013-05-01
*  
* @param  (String) name  组件名
* ------------------------------- ** -->
<#macro LoadZUI name>
	<#local root = "${env.getStaticZUI('')}"/>
	<#if '${name}' == "core">
		<script type="text/javascript" src="${root}/source/datepicker/jquery-1.7.2.min.js" charset="UTF-8"></script>
	<#elseif name == "colorbox">
		<script type="text/javascript" src="${root}/source/colorbox/jquery.colorbox.js" charset="UTF-8"></script>
		<link rel="stylesheet" type="text/css" href="${root}/source/colorbox/colorbox.css" charset="UTF-8"></link>
	<#elseif name == "util">
		<script type="text/javascript" src="${root}/source/util/zui-date-util.js" charset="UTF-8"></script>
	<#elseif name == "date">
		<script type="text/javascript" src="${root}/source/datepicker/jquery-1.7.2.min.js" charset="UTF-8"></script>
		<script type="text/javascript" src="${root}/source/datepicker/jquery.ui.datepicker-zh-CN.js" charset="UTF-8"></script>
		<script type="text/javascript" src="${root}/source/datepicker/jquery-ui-1.8.4.custom.min.js" charset="UTF-8"></script>
		<link rel="stylesheet" type="text/css" href="${root}/source/datepicker/jquery-ui-1.8.4.custom.css" charset="UTF-8"></link>
	</#if>
</#macro>

<#-- ** -------------------------------- 
* Function: Hidden
* 
* @author Brin
* @date   2013-05-01
*  
* @param  (String) name  组件名
* ------------------------------- ** -->
<#macro Hidden name value>
	<#local temp = "${esc.htmlEscape('${value}')}"/>
	<input id="${esc.htmlEscape('${name}')}" type="hidden" name="${esc.htmlEscape('${name}')}" value="${env.getWebURL('${temp}')}"/>
</#macro>

<#-- ** -------------------------------- 
* Function: Menu
* 
* @author Brin
* @date   2013-05-01
*  
* @param  (String) name  组件名
* ------------------------------- ** -->
<#macro Menu name value>
	<input id="${esc.htmlEscape('${name}')}" type="hidden" name="${esc.htmlEscape('${name}')}" value="${esc.htmlEscape('${value}')}"/>
</#macro>

<#-- ** -------------------------------- 
* Function: Menu
* 
* @author Brin
* @date   2013-05-01
*  
* @param  (String) name  组件名
* ------------------------------- ** -->
<#macro PAGING_PANEL totalRows curPage pageSize pageUrl condition>
	<#local root = "${env.getStaticZUI('')}"/>
	<link rel="stylesheet" type="text/css" href="${root}/source/page/page.css" charset="UTF-8"></link>
	<div id="pagebar" class="paginator"></div>
	<input type="hidden" id="totalRows" name="totalRows" value="${totalRows}"/>
	<input type="hidden" id="curPage" name="curPage" value="${curPage}"/>
	<input type="hidden" id="pageSize" name="pageSize" value="${pageSize}"/>
	<input type="hidden" id="pageUrl" name="pageUrl" value="${pageUrl}"/>
	<input type="hidden" id="pageCondition" name="pageCondition" value="${condition}"/>
	<script type="text/javascript" src="${root}/source/page/page2.js" charset="UTF-8"></script>
</#macro>